﻿using System;
using System.Collections.Generic;
using Gameplay.PVE.Utils;
using UnityEngine;
using XLua;
using Yoozoo.Framework.Core;

namespace Gameplay.PVE.Survivor
{
    public class RpgMissionTaskConfig
    {
        public int id;
        public int stage_condition_type;
        public string rpg_mission_task_des;
        public int type;
        public List<float> value;
        public int sign_id;
        public float sign_size;
        public int show_compass;
        public int is_hide;
        public int next_mission;
    }
    
    public partial class BattleConfigManager
    {
        private Dictionary<int, RpgMissionTaskConfig> missionTaskMap;
        
        public RpgMissionTaskConfig GetTaskConfig(int id)
        {
            if (missionTaskMap.TryGetValue(id,out var config))
            {
                return config;
            }
            UnityEngine.Debug.LogError("任务找不到" + id);
            return null;
        }
        
        public static void PreloadRpgMissionTaskConfig(LuaTable table)
        {
            PveUtils.PreloadRpgConfig(table,ref Instance.missionTaskMap);
        }
    }
}
